# Contributor: Peter Shkenev <santurysim@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=fox
pkgver=1.6.57
pkgrel=0
pkgdesc="Free Objects for X"
url="http://www.fox-toolkit.org"
arch="all"
license="LGPL-3.0-or-later"
makedepends="glu-dev libxft-dev"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-adie
	$pkgname-pathfinder
	$pkgname-calculator
	$pkgname-utils
	$pkgname-shutterbug"
source="http://fox-toolkit.org/ftp/fox-$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 LICENSE LICENSE_ADDENDUM \
		-t "$pkgdir"/usr/share/licenses/$pkgname
}

adie() {
	license="GPL-2.0-or-later"
	pkgdesc="Adie text editor"
	amove usr/bin/Adie.stx
	amove usr/bin/adie
}

pathfinder() {
	pkgdesc="$pkgdesc - fast file manager"
	amove usr/bin/PathFinder
}

calculator() {
	license="GPL-2.0-or-later"
	pkgdesc="$pkgdesc - calculator"
	amove usr/bin/calculator
}

utils() {
	pkgdesc="$pkgname (development utilities)"
	amove usr/bin/reswrap
}

shutterbug() {
	license="GPL-2.0-or-later"
	pkgdesc="$pkgname - screen snapshot application"
	amove usr/bin/shutterbug
}

sha512sums="
e7b91054a9ea674818803415284cb61572935d22466e446cb37ef68344e2684e8acd567f7c8a6912f939dcbcc37455119ad6a01ac30513f460d0b3937b7e6087  fox-1.6.57.tar.gz
"
